/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package queenb.web.store;

import java.sql.SQLException;
import java.util.Date;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
import oracle.jdbc.OracleTypes;
import queenb.net.datacontrol.DataStatement;
import queenb.net.datacontrol.Param;
import queenb.net.entitybean.C350;
import queenb.web.util.PackageContants;

/**
 *
 * @author Nguyen Hung
 */
public class C350Store extends C350{

    public List<C350> ccurpks_listoftabc350(int pnFH000, int pnFH200,int pnFC425, String pvLOGIN) {
        try {
            DataStatement data = new DataStatement(PackageContants.ccurpks_listoftabc350, OracleTypes.CURSOR, new Param[]{
                        new Param(OracleTypes.INTEGER, pnFH000),
                        new Param(OracleTypes.INTEGER, pnFH200),
                         new Param(OracleTypes.CHAR, pnFC425),
                        new Param(OracleTypes.CHAR, pvLOGIN)
                    });
            return super.find(data, C350.class);
        } catch (SQLException ex) {
            Logger.getLogger(C350Store.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        } catch (InstantiationException ex) {
            Logger.getLogger(C350Store.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        } catch (IllegalAccessException ex) {
            Logger.getLogger(C350Store.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        }
    }

    public int stdc_tools_inserttabc350(int pnPC350,int pnFH000, int pnFH200,int pnFC425,int pnCN351 , String pvCV352,String pvCV353, String pvLOGIN) {
        DataStatement dataStetament = new DataStatement(PackageContants.stdc_tools_inserttabc350, OracleTypes.INTEGER, new Param[]{
                    new Param(OracleTypes.INTEGER, pnPC350),
                
                    new Param(OracleTypes.INTEGER, pnFH000),
                    new Param(OracleTypes.INTEGER, pnFH200),
                        new Param(OracleTypes.INTEGER, pnFC425),
                        new Param(OracleTypes.INTEGER, pnCN351),
                    new Param(OracleTypes.CHAR, pvCV352),
                     new Param(OracleTypes.CHAR, pvCV353),
                    new Param(OracleTypes.CHAR, pvLOGIN),});
        try {
            return super.update(dataStetament, C350.class);
        } catch (SQLException ex) {
            Logger.getLogger(C350Store.class.getName()).log(Level.SEVERE, null, ex);
            return 0;
        }
    }

    public int stdc_tools_stornotabc350(int pnPC350, String pvLOGIN) {
        try {
            DataStatement dataStatement = new DataStatement(PackageContants.stdc_tools_stornotabc350, OracleTypes.INTEGER, new Param[]{
                        new Param(OracleTypes.INTEGER, pnPC350),
                        new Param(OracleTypes.CHAR, pvLOGIN)
                    });
            return super.update(dataStatement, C350.class);
        } catch (SQLException ex) {
            Logger.getLogger(C350Store.class.getName()).log(Level.SEVERE, null, ex);
            return 0;
        }

    }
    
//     public List<C350> findAllC350ForCombo(int pnFH000, int pnFH200, int pnPC350,String pvKV303, String pvLOGIN) {
//        try {
//            DataStatement dataStatement = new DataStatement(PackageContants.cc, OracleTypes.CURSOR, new Param[]{
//                        new Param(OracleTypes.INTEGER, pnFH000),
//                        new Param(OracleTypes.INTEGER, pnFH200),
//                        new Param(OracleTypes.INTEGER, pnPC350),
//                         new Param(OracleTypes.CHAR, pvKV303),
//                        new Param(OracleTypes.CHAR, pvLOGIN)
//                    });
//            return super.find(dataStatement, C350.class);
//        } catch (SQLException ex) {
//            Logger.getLogger(C350Store.class.getName()).log(Level.SEVERE, null, ex);
//            return null;
//        } catch (InstantiationException ex) {
//            Logger.getLogger(C350Store.class.getName()).log(Level.SEVERE, null, ex);
//            return null;
//        } catch (IllegalAccessException ex) {
//            Logger.getLogger(C350Store.class.getName()).log(Level.SEVERE, null, ex);
//            return null;
//        }
//    }

}
